package com.samphanie.ane.app

import android.app.Application
import com.google.gson.Gson
import com.samphanie.ane.library.log.AneConsolePrinter
import com.samphanie.ane.library.log.AneLogConfig
import com.samphanie.ane.library.log.AneLogManager

/**
 * @author ZSY
 */
class MApplication : Application(){

    override fun onCreate() {
        super.onCreate()

        AneLogManager.init(object : AneLogConfig() {
            override fun injectJsonParser(): JsonParser {
                return JsonParser { src -> Gson().toJson(src) }
            }

            override fun getGlobalTag(): String {
                return "MApplication"
            }

            override fun enable(): Boolean {
                return true
            }
        }, AneConsolePrinter())
    }
}